using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace ScreenMonkey.Plugin.Clips.Song
{
    class VerseOrderToolstripRenderer : System.Windows.Forms.ToolStripRenderer
    {
        protected override void OnRenderButtonBackground(System.Windows.Forms.ToolStripItemRenderEventArgs e)
        {
            Color highlight = Color.Black;
            if (e.Item.Selected)
            {
                highlight = Color.DarkOrange;
            }
            else if (((ToolStripButton)e.Item).Checked)
            {
                highlight = Color.FromArgb(128, 128, 0);
            }

            LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, e.Item.Width, e.Item.Height / 2), highlight, Color.Black, LinearGradientMode.Vertical);
            brush.WrapMode = WrapMode.TileFlipX;
            e.Graphics.FillRectangle(brush, 0, 0, e.Item.Width, e.Item.Height);
        }

    }
}
